1. Field of the Invention
The present invention relates to an installed-software development assistance system which is suitably used, for example, in cases in which software systems to be installed are developed.
2. Description of the Related Art
In recent years, in various types of electronic apparatuses, often, a microcomputer and a program which operates on this microcomputer are installed, and various types of control are performed by software. In general, such an electronic apparatus comprises a software system 500 to be installed, such as that shown in FIG. 25.
The software system 500 to be installed comprises a CPU (Central Processing Unit) 501 which executes a program, a RAM (Random Access Memory) 502, a ROM (Read Only Memory) 503, an EEPROM (Electrically Erasable ROM) 504, and an input/output device 505. The CPU 501 is connected to other component devices through a bus 506 and performs communication with the other component devices via the bus 506. The program has been stored in the ROM 503.
The CPU 501 reads a program and executes it, performing a computation in accordance with various signals input from the input/output device 505 and outputting the computation result to the input/output device 505. For the program execution form, there are cases in which the CPU 501 reads text codes from the program stored in the ROM 503 via the bus 506, and the program is directly executed in the CPU 501, and there are other cases in which text codes read by the CPU 501 are copied once into the RAM 502, and these copied text codes are read from the RAM 502 and are executed.
Generally, the ROM 503 has an access speed which is slower than that of the RAM 502. For this reason, normally, in either case, the data codes in the program are copied into the RAM 502 and are used. In the software system 500 to be installed, when the execution speed of the program is increased, it is preferable that the text codes stored on the ROM 503 be copied once into the RAM 502 and that the CPU 501 execute the text codes copied into the RAM 502. However, in the software system 500 to be installed, when the text codes are to be copied into the RAM 502, the size required for the RAM 502 is increased by an amount corresponding to the text codes, resulting in increased cost.
Also, in the software system 500 to be installed, since the EEPROM 505 is rewritable, and furthermore, since memory can be maintained even when power supply is stopped, there are cases in which text codes and data codes which may be changed are held in the EEPROM 505.
In the above-described software system 500 to be installed, a program stored in the ROM 503 is generally developed by a software development system 510 such as that shown in FIG. 26. In the following, a description is given by using a case, as an example, in which C language is used as a programming language; however, basic processing is also the same for cases in which other programming languages are used.
In the software development system 510, a header file 511 and a source file 512 are files to be prepared by the user. The header file 511 and the source file 512 may be files created by the user, and may be files selected by the user, which files are prepared in advance by the software development system 510.
Compiling information 513 is optional information which specifies a compiling form with respect to a compiler 514, for example, the type of CPU 501, instructions for optimization, etc.
A compiling processing section 515 compiles the source file 512 by using the compiler 514 suitable for target hardware, the compiling information 513, and the header file 511 in order to create an object file 516.
A library file 517 may be a library which is prepared in advance by the software development system 510 or may be a library created by the user.
Link information 518 is an optional information which specifies a link form with respect to a linker 519.
ROM information 520 is the starting address information of the RAM 502 and/or the ROM 503.
A link section 521 links a plurality of object files 516 by using the linker 519 suitable for target hardware, the library file 517, the link information 518, and the ROM information 520, in order to create one execution-format file 522. This execution-format file 522 contains text codes and data codes.
The completed execution-format file 522 is written into the ROM 503 and is installed into the software system 500 to be installed. When the execution-format file 522 is executed by the CPU 501, there is a case in which the execution-format file 522 is directly executed from the ROM 503 by the CPU 501 in accordance with the setting in the ROM information 520, and there is another case in which the execution-format file 522 is executed by the CPU 501 after the file is copied once into the RAM 502.
Next, the software development procedure in the software development system 510 is described. In the following, a first example shown in FIG. 27 is described.
In the first example, as shown in FIG. 27, initially, a system library 523, a system source file 524, and a user source file 525 are prepared. The system library 523 corresponds to the library file 517 in FIG. 26. The system library 523 is a library containing a program which is, for example, provided by the software development system 510 and which realizes the functions of an OS.
The system source file 524 corresponds to the source file 512 in FIG. 26. The system source file 524 is a source file containing a program which is, for example, provided by the software development system 510 and which realizes the functions of an OS. The system source file 524, in general, is often distributed only to the hardware-dependent portion in the program which is finally completed. The user source file 525 corresponds to the system source file 524 in FIG. 26, and is a source file created for the control of an electronic apparatus by the user.
In the first example, the compiling processing section 515 compiles the system source file 524 and the user source file 525, thereby creating an object file 526 and an object file 527, respectively. The object file 526 and the object file 527 correspond to the object file 516 in FIG. 26.
Next, the link section 521 links the system library 523, the object file 526, and the object file 527, thereby creating one execution-format file 522.
The execution-format file 522 comprises, for example, as shown in FIG. 28, internal structure information 530, a text section 531, an initialization data section 532, an initialization-unnecessary-data section 533, and a debugging information section 534. As forms of such an execution-format file 522, specifically, for example, ELF (Executable and Linking Format), COFF (Common Object File Format), etc., are known.
The internal structure information 530, which is positioned at the start portion of the execution-format file 522, contains information for identifying the contents of the portions which follow, information for the length thereof, etc. By analyzing this internal structure information 530, necessary information can be extracted from the portions which follow.
As shown in FIG. 27, the text section 531 is program codes which are assembled from each of the system library 523, the object file 526, and the object file 527 and are linked.
The initialization data section 532 is an initial-value data area for variables which are assembled and linked in a similar manner.
The initialization-unnecessary-data section 533 is a data area for variables, in which initial values are not determined, which are assembled and linked in a similar manner.
The debugging information section 534 is an area in which symbol information, such as variable names, is stored for the purpose of debugging programs.
When the execution-format file 522 is installed into the software system 500 to be installed, it is written into the ROM 503, for example, in the structure such as that shown in FIG. 29, forming an execution program 540. That is, of the execution-format file 522, the internal structure information 530, the initialization-unnecessary-data section 533, and the debugging information section 534 are not written onto the ROM 503, and only the text section 531 and the initialization data section 532 are written. Also, at this time, by referring to the internal structure information 530, the text section 531 and the initialization data section 532 are extracted from this execution-format file 522.
In the software system 500 to be installed, when the execution program 540 written into the ROM 503 is executed by the CPU 501, as shown in FIG. 30, the initialization data section 532 is copied from this execution program 540 into the RAM 502, and the initialization-unnecessary-data section 533 is created in the RAM 502. At this time, the initialization data section 532 copied into the RAM 502 is copied from the execution program 540 stored on this ROM 503 in accordance with the starting address and the copy size indicated in the text section 531 on the ROM 503. Also, the initialization-unnecessary-data section 533 created in the RAM 502 is created by the software system 500 to be installed in accordance with the information indicated in the text section 531 on the ROM 503.
In the software system 500 to be installed, when the execution program 540 is written onto the ROM 503 on the basis of the execution-format file 522 developed by the above-described first procedure, the text section 531 is not copied to the RAM 502 and is directly executed from the ROM 503 by the CPU 501. In this case, setting indicating that the text section 531 is not copied to the RAM 502 is made in the ROM information 520 in the software development system 510.
Next, a method for starting the execution program 540 in the software system 500 to be installed is described with reference to FIG. 31.
In step S550, the starting of the execution program 540 is begun.
In step S551, the CPU 501 reads the text section 531 stored in the ROM 503, which starts from the specific address corresponding to the type of CPU 501, and executes it.
In step S552, the CPU 501 initializes the RAM 502, the input/output device 505, etc., in accordance with a program in the text section 531.
In step S553, the CPU 501 copies the initialization data section 532 on the ROM 503 into the RAM 502 in accordance with the program in the text section 531.
In step S554, the CPU 501 creates the initialization-unnecessary-data section 533 in the RAM 502 in accordance with the program in the text section 531.
In step S555, the CPU 501 executes a program code which follows the text section 531 while accessing the initialization data section 532 and the initialization-unnecessary-data section 533 in the RAM 502.
In step S556, the operation of the execution program 540 is terminated.
In the above description, the first example which is a case in which the text section 531 is not copied into the RAM 502 is described. In the following, a second example in which a text section 531 is copied into the RAM 502 is described with reference to FIGS. 32 to 36. In the following, descriptions of portions which are duplicates of the above description are omitted, and corresponding numerals are used in the drawings.
In the software development procedure by the software development system 510 in accordance with the second example, as shown in FIG. 32, in addition to the system library 523, the system source file 524, and the user source file 525, a boot source file 560 is prepared. The boot source file 560 corresponds to the source file 512 in FIG. 26, and contains a processing command for copying the text section 531 from the ROM 503 into the RAM 502.
In the second example, in a manner similar to that of the first example, the compiling processing section 515 creates the object file 526 and the object file 527 and compiles the boot source file 560, thereby creating a boot object file 561. Then, the link section 521 creates the execution-format file 522 in a manner similar to that in the first example, and the boot object file 561 is linked with the system library 523, thereby creating a boot program 562. The boot program 562 has an internal structure similar to that of the execution-format file 522.
In this second example, the execution-format file 522 and the boot program 562, created in the above manner, are written into the ROM 503 in a structure such as that shown in FIG. 33, forming an execution program 570. That is, the execution program 570 is composed of a boot code 571, a copy block information group 572, an execution starting address 573, a text section 531, and an initialization data section 532.
The boot code 571 is a text code of the boot program 562 and corresponds to the text section 531 of the execution-format file 522. The copy block information group 572 is information of data to be copied from the ROM 503 to the RAM 502. The execution starting address 573 indicates the address at which the execution of the text section 531 is started after copying.
The copy block information group 572, as shown in FIG. 34, has a copy source address 574, a copy source size 575, a copy target address 576, a copy target size 577, a text section 531, an initialization data section 532, and an initialization-unnecessary-data section 533.
The copy source address 574 is a starting address at which copying of each section stored on the ROM 503 is started. The copy source size 575 is the size of each section to be read from the ROM 503. The copy target address 576 is a starting address of each section in the RAM 502. The copy target size 577 is the size of each section in the RAM 502.
The text section 531 and the initialization data section 532 generally correspond to the copy source size 575 and the copy target size 577, but may differ depending on the alignment required by the CPU 501. For the initialization-unnecessary-data section 533, an invalid value is set in the copy source address 574, and xe2x80x9c0xe2x80x9d is set in the copy target address 576.
In the software system 500 to be installed, when the CPU 501 executes the execution program 570 written into the ROM 503, as shown in FIG. 35, the text section 531 and the initialization data section 532 are copied from this execution program 570 into the RAM 502, and the initialization-unnecessary-data section 533 is created in the RAM 502. At this time, the text section 531 and the initialization data section 532 are copied from the ROM 503 into the RAM 502 by referring to the copy block information group 572 by the CPU 501 in accordance with the boot code 571. In a similar manner, the initialization-unnecessary-data section 533 is created in the RAM 502 by referring to the copy block information group 572 by the CPU 501 in accordance with the boot code 571.
The software system 500 to be installed copies the text section 531 and the initialization data section 532 from the execution program 570 on the ROM 503 developed by the above-described second procedure, and creates the initialization-unnecessary-data section 533 in the RAM 502, and the CPU 501 executes the text section 531 copied into the RAM 502. In this case, setting indicating that the text section 531 is to be copied to the RAM 502 is made in the ROM information 520 of the software development system 510.
Next, a method for starting the execution program 570 in the software system 500 to be installed is described with reference to FIG. 36.
In step S580, the CPU 501 starts the execution program 570.
In step S581, the CPU 501 reads the boot code 571 and executes it.
In step S582, the CPU 501 initializes the RAM 502, the input/output device 505, etc., in accordance with the program in the boot code 571.
In step S583, the CPU 501 refers to the copy block information group 572 in accordance with the program in the boot code 571, and copies the text section 531 on the ROM 503 into the RAM 502.
In step S584, the CPU 501 refers to the copy block information group 572 in accordance with the program in the boot code 571, and copies the initialization data section 532 on the ROM 503 into the RAM 502.
In step S585, the CPU 501 refers to the copy block information group 572 in accordance with the program in the boot code 571, and creates the initialization-unnecessary-data section 533 in the RAM 502.
In step S586, the CPU 501 refers to the copy block information group 572 in accordance with the program in the boot code 571, and executes the program code of the text section 531 in the RAM 502 while accessing the initialization data section 532 and the initialization-unnecessary-data section 533 in the RAM 502.
In step S587, the operation of the execution program 570 is terminated.
In a software system to be installed, such as in that described above, there has been a demand for programs to be formed into modules from the- viewpoint of ease of installation into electronic apparatuses and expandability of functions. Also, in recent years, there has been a demand for electronic apparatuses to include various communication functions. For example, electronic apparatuses, which are connected to a telephone line, having functions for performing various types of communication over a network, and electronic apparatuses having functions for performing transmission and reception of various software modules via a network have been developed.
It is preferable that a software system to be installed which is installed into such an electronic apparatus support various communication functions and software module transmission and reception functions at the level of an operating system (OS), which is basic software. Also, it is preferable that a software system to be installed be capable of concurrently executing a plurality of programs which are formed into modules.
However, there is a problem in that since a conventional software development system 510 basically uses one execution-format file 522 as an object, a plurality of execution-format files 522 cannot be concurrently handled. Also, it is difficult for the conventional software development system 510 to appropriately assign a plurality of execution-format files 522 to each storage device in a case in which a plurality of various storage devices, such as not only a RAM 502 and a ROM 503, but also an EEPROM 504, can be used, and it is difficult for the conventional software development system 510 to appropriately adjust the locations of addresses on each storage device.
Accordingly, it is an object of the present invention to provide an installed-software development assistance system which is capable of appropriately and easily assigning a plurality of programs to a plurality of storage devices.
In one aspect, the information processing apparatus in accordance with the present invention comprises a program location determination section for determining which one of a plurality of storage devices is to be used to store and/or execute at least one program. The program location determination section performs the determination on the basis of priority information indicating the priority of each of the programs.
In the information processing apparatus constructed as described above, since the program location determination section determines which one of the storage devices is used to store and/or execute each program on the basis of priority information, it is possible to appropriately assign a plurality of programs to a plurality of storage devices.
In another aspect, the information processing method in accordance with the present invention is an information processing method for assigning programs to be executed by a program execution section having at least a computation device and a plurality of storage devices to determine which one of the storage devices is to be used to store and/or execute at least one program. Also, the information processing method in accordance with the present invention comprises reading priority information indicating the priority of each of the programs; and determining the assignment of each of the programs on the basis of the priority information.
Therefore, according to the information processing method of the present invention, it is possible to appropriately and easily assign a plurality of programs to a plurality of storage devices.
In another aspect, the program writing apparatus in accordance with the present invention is a program writing apparatus for writing at least one program into a program execution section having at least a computation device and a plurality of storage devices. The program writing apparatus in accordance with the present invention comprises a program location determination section and a program writing section. The program location determination section determines which one of the storage devices is to be used to store and/or execute at least one of the programs on the basis of priority information indicating the priority of each program. The program writing section writes each of the programs into a respective one of each of the storage devices, in accordance with the determination result of the program location determination section.
In the program writing apparatus constructed as described above, the program location determination section determines which one of the storage devices is used to hold and/or execute at least one program on the basis of priority information. Based on this determination result, the program location section locates each program in each storage device. This makes it possible for a plurality of programs to be appropriately assigned and written into each storage device.
The above and further objects, aspects and novel features of the invention will become more apparent from the following detailed description when read in connection with the accompanying drawings.